package com.lantosec.hmrp.modules.internal.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.internal.entity.InternalTaskExecutor;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 评价任务评价人 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-06-19
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="InternalTaskExecutor对象", description="评价任务评价人")
public class InternalTaskExecutorVO extends BaseVO<InternalTaskExecutor> {
    private static final long serialVersionUID = 1L;


    public InternalTaskExecutorVO(InternalTaskExecutor entity){
        this.internalTaskExecutorId = entity.getInternalTaskExecutorId();
        this.internalTaskId = entity.getInternalTaskId();
        this.executorMode = entity.getExecutorMode();
        this.executorDeptId = entity.getExecutorDeptId();
        this.executorPositionId = entity.getExecutorPositionId();
        this.executorUserId = entity.getExecutorUserId();
        this.targetTotalnum = entity.getTargetTotalnum();
        this.targetFinishednum = entity.getTargetFinishednum();
    }

    @Override
    public InternalTaskExecutor convertToEntity(){
        return new InternalTaskExecutor(this);
    }


    @ApiModelProperty(value = "主键ID")
    @TableId(value = "internal_task_executor_id", type = IdType.AUTO)
    private Integer internalTaskExecutorId;

    @ApiModelProperty(value = "评价任务ID")
    private Integer internalTaskId;

    @ApiModelProperty(value = "评价方形式")
    private Integer executorMode;

    @ApiModelProperty(value = "评价方ID（部门）")
    private String executorDeptId;

    @ApiModelProperty(value = "评价方ID（岗位）")
    private String executorPositionId;

    @ApiModelProperty(value = "评价人ID")
    private String executorUserId;

    @ApiModelProperty(value = "被评价对象总数")
    private Integer targetTotalnum;

    @ApiModelProperty(value = "已评价的被评价对象数")
    private Integer targetFinishednum;

    @ApiModelProperty(value = "评价人名称")
    private String name;
}
